<?php
/**
 * Created by PhpStorm.
 * User: lwl
 * Date: 2021/05/20
 * Time: 12:45 PM
 */
use Illuminate\Support\Facades\Route;
use App\Http\Controllers\Admin\AuthController;
use App\Http\Controllers\Admin\CategoryController;
use App\Http\Controllers\Admin\FriendController;
use App\Http\Controllers\Admin\SiteController;
use App\Http\Controllers\Admin\SocialController;
use App\Http\Controllers\Admin\FocusController;
use App\Http\Controllers\Admin\PostController;

Route::group(["namespace" => "Admin",'prefix'=>'admin'], function () {
    Route::group(["middleware" => ["jwt.admins"]], function () {
        Route::post('logout', [AuthController::class,'logout']);//登出
        Route::get('info', [AuthController::class,'info']);//我的信息
        Route::put('password', [AuthController::class,'password']);//更新密码
        Route::put('info', [AuthController::class,'editInfo']);//更新个人信息
    });
    Route::post('login', [AuthController::class,'login']);//登录

    //分类 by:lwl
    Route::post('category', [CategoryController::class,'store']);//分类新增
    Route::get('categories', [CategoryController::class,'lists']);//分类列表
    Route::get('category', [CategoryController::class,'show']);//分类详情
    Route::put('category', [CategoryController::class,'edit']);//分类更新
    Route::delete('category', [CategoryController::class,'remove']);//分类删除
    //分类

    //友情链接 by:lwl
    Route::post('friend', [FriendController::class,'store']);//友情链接新增
    Route::get('friends', [FriendController::class,'lists']);//友情链接列表
    Route::get('friend', [FriendController::class,'show']);//友情链接详情
    Route::put('friend', [FriendController::class,'edit']);//友情链接更新
    Route::delete('friend', [FriendController::class,'remove']);//友情链接删除
    //友情链接

    //站点 by:lwl
    Route::post('site', [SiteController::class,'store']);//站点新增
    Route::get('sites', [SiteController::class,'lists']);//站点列表
    Route::get('site', [SiteController::class,'show']);//站点详情
    Route::put('site', [SiteController::class,'edit']);//站点更新
    Route::delete('site', [SiteController::class,'remove']);//站点删除
    //站点

    //焦点 by:lwl
    Route::post('focus', [FocusController::class,'store']);//站点新增
    Route::get('focuses', [FocusController::class,'lists']);//站点列表
    Route::get('focus', [FocusController::class,'show']);//站点详情
    Route::put('focus', [FocusController::class,'edit']);//站点更新
    Route::delete('focus', [FocusController::class,'remove']);//站点删除
    //焦点

    //社交活动 by:lwl
    Route::post('social', [SocialController::class,'store']);//站点新增
    Route::get('socials', [SocialController::class,'lists']);//站点列表
    Route::get('social', [SocialController::class,'show']);//站点详情
    Route::put('social', [SocialController::class,'edit']);//站点更新
    Route::delete('social', [SocialController::class,'remove']);//站点删除
    //社交活动

    //文章 by:lwl
    Route::post('post', [PostController::class,'store']);//站点新增
    Route::get('poss', [PostController::class,'lists']);//站点列表
    Route::get('post', [PostController::class,'show']);//站点详情
    Route::put('post', [PostController::class,'edit']);//站点更新
    Route::delete('post', [PostController::class,'remove']);//站点删除
    //文章
});
